/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.gov.mtc.dgac.licencias.persistence;

import java.util.List;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;
import pe.gov.mtc.dgac.licencias.bean.AreaTO;

/**
 *
 * @author elvis
 */
@Repository
public class AreaHibDAO extends HibernateDaoSupport implements AreaDAO {

     @Autowired
    public AreaHibDAO(SessionFactory sessionFactory){
            setHibernateTemplate( new HibernateTemplate(sessionFactory));
    }
     
    public List<AreaTO> listarAreas() {
        return this.getHibernateTemplate().find("from AreaTO a");
    }

}
